package com.spsoft.workflow.common.enums.bus;

import com.spsoft.workflow.common.WorkFlowConstants;
import com.spsoft.workflow.common.enums.BusFlowTypeEnums;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 下载授信额度流程节点枚举
 *
 * @author cdl
 * @date 2023/12/15
 */
@Getter
@AllArgsConstructor
public enum CreditDownLoadNodeEnums {

    /**
     * 提交
     */
    ROOT(WorkFlowConstants.ROOT_EVENT_ID, "提交"),
    /**
     * 审批
     */
    FLOW_XZSXED_SP(BusFlowTypeEnums.FLOW_XZSXED + "_SP", "审批"),

    /**
     * 下载
     */
    FLOW_XZSXED_XZ(BusFlowTypeEnums.FLOW_XZSXED + "_XZ", "下载");

    private final String code;
    private final String name;

    public static CreditDownLoadNodeEnums valueOfCode(String code) {
        for (CreditDownLoadNodeEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
